﻿using B.S.BaseData.suyuan.ApiRead.Account.Command;
using B.S.BaseData.suyuan.ApiRead.DTO;
using B.S.BaseData.Suyuan.Command;
using B.S.BaseData.Suyuan.Dommain;
using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace B.S.BaseData.suyuan.ApiRead.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class GetRibbitersEController : ControllerBase
    {
        private readonly IMediator mediator;

        public GetRibbitersEController(IMediator mediator)
        {
            this.mediator = mediator;
        }

        /// <summary>
        /// 显示商品信息
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        [HttpGet]
        public Task<ApiResult<IList<ShopMondel>>> ShowShop([FromQuery]GetShopCommand request)
        {
           return mediator.Send(request);
        }
        /// <summary>
        /// 显示基本信息
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        [HttpGet]
        public Task<ApiResult<ApiPaging<GetQuanDto>>> Showjiben([FromQuery]GetrabbitCommand request, CancellationToken cancellationToken)
        {
            return mediator.Send(request);
        }
    }
}
